﻿using System;
using System.Windows;
using System.Windows.Threading;

namespace Lottery.Client.SL.Controls
{
    public partial class SetRewards
    {
        public SetRewards()
        {
            InitializeComponent();
        }
        public void InitSlider(int playtypeid, double scale, double backpct, double scale_base)
        {
            //this.mhLpMWSOPg.WinTypeID = playtypeid;
            //this.gE5pJ2hXUD = scale + scale_base * backpct;
            //this.Nk8pIOmonh = scale_base * 0.8;
            //this.PWQpwUU8Gi = scale_base * 0.005;
            //if (this.gE5pJ2hXUD < this.Nk8pIOmonh)
            //{
            //    App.ShowMsg(BcZJxKMIDcH0kvSFls.w4WekCpilj(19452));
            //    base.DialogResult = new bool?(false);
            //    return;
            //}
            //this.yeQpxtlb4V = scale_base;
            //this.sliderBonus.set_Maximum(this.gE5pJ2hXUD);
            //this.sliderBonus.set_Minimum(this.Nk8pIOmonh);
            //this.sliderBonus.set_Value(scale);
            //RangeBase arg_B9_0 = this.sliderBonus;
            //double pWQpwUU8Gi;
            //this.sliderBonus.set_LargeChange(pWQpwUU8Gi = this.PWQpwUU8Gi);
            //arg_B9_0.set_SmallChange(pWQpwUU8Gi);
            //this.IjbpKdcsLo();
        }

        private void btClose_Click(object sender, RoutedEventArgs e)
        {
            base.DialogResult = new bool?(false);
        }

        private void btSave_Click(object sender, RoutedEventArgs e)
        {
            this.gridLoading.Visibility = Visibility.Visible;
            this.gridMain.Visibility = Visibility.Collapsed;
            DispatcherTimer t = new DispatcherTimer();
            t.Interval = TimeSpan.FromSeconds(1);
            t.Tick += (o, a) =>
                          {
                              App.ShowMsg("保存成功！");
                              this.gridLoading.Visibility = Visibility.Collapsed;
                              this.gridMain.Visibility = Visibility.Visible;
                          };
            //App.app_client.SetUserScaleInfoCompleted += new ClientControl.RecvCodeEventHandler(this.UlKpBBtN7Q);
            //App.app_client.SetUserScaleInfo(this.mhLpMWSOPg);
        }
    }

}
